//
//  ContentView.swift
//  WuZhen
//
//  Created by 今安在 on 2024/3/24.
//
import SwiftUI

struct ContentView: View {
    @State private var showMainTabView = false
    
    var body: some View {
        Group {
            if showMainTabView {
                Advertisment()
            } else {
                VStack {
                    GeometryReader { geometry in
                        Image("lai")
                            .resizable()
                            .aspectRatio(contentMode: .fit)
                            .frame(width: geometry.size.width)
                            .frame(maxHeight: .infinity)
                        
                    }
                    ProgressView()
                }
                .padding()
                .onAppear {
                    DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
                        showMainTabView = true
                    }
                }
            }
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
